<template>
  <div class="side">
    <div class="user">
        <img :src="data.avatar" alt="">
            <p>{{data.author}}</p>
            <span>{{data.blogName}}</span>
    </div>
  </div>
</template>

<script>
import { detail } from "../../../units/api";
export default {
    data(){
        return{
            data:{}
        }
    },
  created() {
    this.getUser();
  },
  methods: {
    async getUser() {
      let res = await detail();
      this.data = structuredClone(res.data.data)
    //   console.log(this.data);
    },
  },
};
</script>

<style scoped lang="scss">
.side {
  padding: 40px 0;
  .user {
    width: 100%;
    height: 170px;
    background-color: #fff;
    line-height: 8px;
    padding: 20px;
    box-sizing: border-box;
    img{
        width:40px;
        height: 40px;
        border-radius: 50%;

    }
    span{
        font-size: 12px;

    }
  }
}
</style>